﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;


namespace Software41.TrackingExample.TestService
{
    [ServiceContract(Namespace="http://Software41.TrackingExample.TestService/Service")]
    public interface ITestService
    {
        [OperationContract]
        TestResponse DoWork(TestRequest message);
    }

    [DataContract(Namespace="http://Software41.TrackingExample.TestService/Contract")]
    public class TestRequest
    {
        string processid = String.Empty;
        string message = String.Empty;
        string status = String.Empty;

        [DataMember]
        public string ProcessId
        {
            get { return processid; }
            set { processid = value; }
        }

        [DataMember]
        public string Message
        {
            get { return message; }
            set { message = value; }
        }

        [DataMember]
        public string Status
        {
            get { return status; }
            set { status = value; }
        }
    }

    [DataContract(Namespace = "http://Software41.TrackingExample.TestService/Contract")]
    public class TestResponse
    {
        string processid = String.Empty;
        string message = String.Empty;
        string status = String.Empty;
        bool success = true;

        [DataMember]
        public string ProcessId
        {
            get { return processid; }
            set { processid = value; }
        }

        [DataMember]
        public string Message
        {
            get { return message; }
            set { message = value; }
        }

        [DataMember]
        public string Status
        {
            get { return status; }
            set { status = value; }
        }

        [DataMember]
        public bool Success
        {
            get { return success; }
            set { success = value; }
        }
    }
}
